/**
 * ------------------------------------------------------
 *  接口request请求中转
 * ------------------------------------------------------
 *
 * Note: .根据配置文件选择使用fetch或axios请求方式
 */

import { REQUEST_MODE } from "@/config/constants"
import { requestAxios } from "./request-axios"
import { requestFetch } from "./request-fetch"

function request(config){
  if(REQUEST_MODE==='fetch'){
    return requestFetch(config)
  }else if(REQUEST_MODE==='axios'){
    return requestAxios(config)
  }
}

export { request }
